package com.example.kingdeescan.ui.scan;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.example.kingdeescan.dto.ScanResultDTO;

import java.util.List;

public class ScanViewModel extends ViewModel {

    private MutableLiveData<String> mScanResultText;//扫码结果
    private MutableLiveData<List<ScanResultDTO>> scanResultDTOListMLD;//扫码列表
    private MutableLiveData<List<ScanResultDTO>> scanResultDTOCheckedListMLD;//扫码列表选中项

    public void setmScanResultText(String s) {
        mScanResultText.setValue(s);
    }
    public LiveData<String> getmScanResultText() {
        return mScanResultText;
    }

    public LiveData<List<ScanResultDTO>> getScanResultDTOListMLD() {
        return this.scanResultDTOListMLD;
    }
    public void setScanResultDTOListMLD(List<ScanResultDTO> seOutStockList) {
        this.scanResultDTOListMLD.setValue(seOutStockList);
    }

    public LiveData<List<ScanResultDTO>> getScanResultDTOCheckedListMLD() {
        return this.scanResultDTOCheckedListMLD;
    }
    public void setScanResultDTOCheckedListMLD(List<ScanResultDTO> seOutStockList) {
        this.scanResultDTOCheckedListMLD.setValue(seOutStockList);
    }

    public ScanViewModel() {
        mScanResultText=new MutableLiveData<>();
        scanResultDTOListMLD=new MutableLiveData<>();
        scanResultDTOCheckedListMLD=new MutableLiveData<>();
    }
}